package com.example.demo.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Date;
import java.util.Objects;

public class CanteenMan implements Serializable {
    private Integer cid;
    private String cname;
    private String ctel;
    private String caddr;
    private String ccardid;
    private Date centryday;
    private BigDecimal csalary;

    public CanteenMan(Integer cid, String cname, String ctel, String caddr, String ccardid, Date centryday, BigDecimal csalary) {
        this.cid = cid;
        this.cname = cname;
        this.ctel = ctel;
        this.caddr = caddr;
        this.ccardid = ccardid;
        this.centryday = centryday;
        this.csalary = csalary;
    }

    public CanteenMan() {
    }

    public Integer getCid() {
        return cid;
    }

    public void setCid(Integer cid) {
        this.cid = cid;
    }

    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public String getCtel() {
        return ctel;
    }

    public void setCtel(String ctel) {
        this.ctel = ctel;
    }

    public String getCaddr() {
        return caddr;
    }

    public void setCaddr(String caddr) {
        this.caddr = caddr;
    }

    public String getCcardid() {
        return ccardid;
    }

    public void setCcardid(String ccardid) {
        this.ccardid = ccardid;
    }

    public Date getCentryday() {
        return centryday;
    }

    public void setCentryday(Date centryday) {
        this.centryday = centryday;
    }

    public BigDecimal getCsalary() {
        return csalary;
    }

    public void setCsalary(BigDecimal csalary) {
        this.csalary = csalary;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CanteenMan that = (CanteenMan) o;
        return Objects.equals(cid, that.cid) && Objects.equals(cname, that.cname) && Objects.equals(ctel, that.ctel) && Objects.equals(caddr, that.caddr) && Objects.equals(ccardid, that.ccardid) && Objects.equals(centryday, that.centryday) && Objects.equals(csalary, that.csalary);
    }

    @Override
    public int hashCode() {
        return Objects.hash(cid, cname, ctel, caddr, ccardid, centryday, csalary);
    }

    @Override
    public String toString() {
        return "CanteenMan{" +
                "cid=" + cid +
                ", cname='" + cname + '\'' +
                ", ctel='" + ctel + '\'' +
                ", caddr='" + caddr + '\'' +
                ", ccardid='" + ccardid + '\'' +
                ", centryday=" + centryday +
                ", csalary=" + csalary +
                '}';
    }
}
